using B.S.BasicData.Domain;
using B.S.BasicData.EroorCode;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

[ApiController]
[Route("api/[controller]")]
public class BreedingImmunityInfoController : ControllerBase
{
    private readonly IMediator _mediator;
    public BreedingImmunityInfoController(IMediator mediator)
    {
        _mediator = mediator;
    }

    [HttpPost("add")]
    public async Task<ActionResult<ApiResult<BreedingImmunityInfo>>> Add([FromBody] BreedingImmunityInfoAddRequest request)
    {
        var result = await _mediator.Send(request);
        return Ok(result);
    }
} 